# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=py3-validators
pkgver=0.28.1
pkgrel=0
pkgdesc="Python3 Data Validation for Humans"
url="https://github.com/python-validators/validators"
arch="noarch"
license="MIT"
depends="py3-decorator"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-isort py3-pytest py3-flake8"
subpackages="$pkgname-pyc"
source="https://github.com/python-validators/validators/archive/$pkgver/py3-validators-$pkgver.tar.gz"
builddir="$srcdir/validators-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
6a3b9ffffbdc5f68d7ffd6123251d3bf3b26f5600b3398966abf022ec3c7cafedffe04fc18570ed110f7bbfa6048424a91283bc06384571413270a354784b43d  py3-validators-0.28.1.tar.gz
"
